<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style>
#orderImport input{
		height: 30px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-shadow: none;
	}
</style>
</head>
<body>
<div class="container-fluid" id="orderImport">
	<div class="row">
		<div class="col-xs-12">
			<div class="boxcq clearfix">
                <div class="ti">批量导入医嘱数据</div>
                <ul class="nav nav-tabs boxnavcq" role="tablist"></ul>
                <div class="clearfix padding10">
                	<span>选择时间：</span>
                	<input id="sdate" value="2014-01-01"><span style="margin:0 10px;">-</span><input id="edate" value="2014-01-02">
                	&nbsp;&nbsp;&nbsp;&nbsp;<button id="orderImportBtn" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i>开始导入</button>
                </div>
            </div>
		</div>
	</div>
	<div class="row" style="margin-top:24px;">
		<div class="col-xs-12">
			<div class="boxcq clearfix">
                <div class="ti">单条病例医嘱数据补录</div>
                <ul class="nav nav-tabs boxnavcq" role="tablist"></ul>
                <div class="clearfix padding10">
                	<input id="recordId" placeHolder="输入需要补录的admId(病案号^入院日期)如,12345^2015-01-01" style="width:370px;">
                	&nbsp;&nbsp;&nbsp;&nbsp;<button id="orderImport1Btn" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i>开始导入</button>
                </div>
            </div>
		</div>
	</div>
</div>
<script type="text/javascript">
$("#"+tabId+" #sdate").datetimepicker({
    format: "yyyy-mm-dd",
    autoclose: true,
    todayBtn: true,
    minView: 2,
    language: 'zh-CN'
});
$("#"+tabId+" #edate").datetimepicker({
    format: "yyyy-mm-dd",
    autoclose: true,
    todayBtn: true,
    minView: 2,
    language: 'zh-CN',
});
$("#orderImporting").fadeOut();
	$("#"+tabId+" #orderImportBtn").click(function(){
		$("#orderImporting").fadeIn();
		$.get(contextPath+"/order/orderImport.dhc",{
			"dateFrom": $("#"+tabId+" #sdate").val(),
			"dateTo": $("#"+tabId+" #edate").val(),
		}).done(function(result){
			if(result.success){
				$("#orderImporting").fadeOut();
			}else{
				drgUI.error(result.errorMessage);
			}
		})
	})
	$("#"+tabId+" #orderImport1Btn").click(function(){
		$("#orderImporting").fadeIn();
		$.get(contextPath+"/order/orderImportByRecordId.dhc",{
			"recordId": $("#"+tabId+" #recordId").val()
		}).done(function(result){
			if(result.success){
				$("#orderImporting").fadeOut();
			}else{
				drgUI.error(result.errorMessage);
			}
		})
	})
</script>
</body>
</html>